package com.wanxi.company.controller;


import com.wanxi.common.entity.BusinessLineModel;
import com.wanxi.common.result.ResultDTO;
import com.wanxi.company.service.impl.BusinessLineServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class BusinessLineController {

    @Autowired
    private BusinessLineServiceImpl businessLineService;


    @RequestMapping("/back/businessLine/findAll")
    public ResultDTO findAll(BusinessLineModel businessLine) {

        ResultDTO resultDTO = businessLineService.findAll(businessLine);
        return resultDTO;
    }


    @RequestMapping("/back/businessLine/add")
    public ResultDTO add(BusinessLineModel businessLine) {

        ResultDTO resultDTO = businessLineService.add(businessLine);
        return resultDTO;
    }


    @RequestMapping("/back/businessLine/delete")
    public ResultDTO delete(BusinessLineModel businessLine) {

        ResultDTO resultDTO = businessLineService.delete(businessLine);
        return resultDTO;
    }


    @RequestMapping("/back/businessLine/findById")
    public ResultDTO findById(BusinessLineModel businessLine) {

        ResultDTO resultDTO = businessLineService.findById(businessLine);
        return resultDTO;
    }



    @RequestMapping("/back/businessLine/update")
    public ResultDTO update(BusinessLineModel businessLine) {

        ResultDTO resultDTO = businessLineService.update(businessLine);
        return resultDTO;
    }


}
